package model

import "duoke/tables"

type ScreenNewOrder struct {
	tables.Order `xorm:"extends"`
	HeadNickname string            `xorm:"-" json:"head_nickname" form:"head_nickname"`
	FromUser     *tables.GoodsUser `xorm:"-" json:"from_user" form:"from_user"`
	Staff        *tables.GoodsUser `xorm:"-" json:"staff" form:"staff"`
	Head         *tables.GoodsUser `xorm:"-" json:"head" form:"head"`
	HeadOrder    *Order            `xorm:"-" json:"head_order" form:"head_order"`
	MemberNum    int               `xorm:"-" json:"member_num" form:"member_num"`
	OrderTime    string            `xorm:"-" json:"order_time" form:"order_time"`
	Member       []Order           `xorm:"-" json:"member" form:"member"`
}

func (ScreenNewOrder) TableName() string {
	return "order"
}

type ScreenStaff struct {
	tables.GoodsUser `xorm:"extends"`
	OrderNum         int64   `xorm:"-" json:"order_num" form:"order_num"`
	InviteNum        int64   `xorm:"-" json:"invite_num" form:"invite_num"`
	ShareNum         float64 `xorm:"-" json:"share_num" form:"share_num"`
}

func (ScreenStaff) TableName() string {
	return "goods_user"
}
